local qunxian3__baishoukaiduo_zuiqiangshengwu = fk.CreateSkill {

  name = "qunxian3__baishoukaiduo_zuiqiangshengwu",

  tags = { Skill.Wake, },

}

Fk:loadTranslationTable {
  ["qunxian3__baishoukaiduo_zuiqiangshengwu"] = "最强生物",
  [":qunxian3__baishoukaiduo_zuiqiangshengwu"] = [[觉醒技，共鸣技，可觉醒两次，进入濒死状态时。将形态转换为下形态（人型，酒龙型）并失去其他形态的技能，且你的体力值调整至五，并立即执行一个额外回合。<br/>
龙型：你视为拥有技能【<a href=':qunxian3__baishoukaiduo_longjuan'>龙卷</a>】，【<a href=':qunxian3__baishoukaiduo_huaifeng'>坏风</a>】，【<a href=':qunxian3__baishoukaiduo_rexi'>热息</a>】，【<a href=':qunxian3__baishoukaiduo_yanyun'>焰云</a>】。<br/>
人型：你视为拥有技能【<a href=':qunxian3__baishoukaiduo_leimingbagua'>雷鸣八卦</a>】，【<a href=':qunxian3__baishoukaiduo_yinnailuo'>引奈落</a>】，【<a href=':qunxian3__baishoukaiduo_longshengjun'>龙盛军</a>】，【<a href=':qunxian3__baishoukaiduo_daweide'>大威德</a>】。<br/>
酒龙型：你视为拥有技能【<a href=':qunxian3__baishoukaiduo_jiulongrexi'>酒龙热息</a>】，【<a href=':qunxian3__baishoukaiduo_longjuanhuaifeng'>龙卷坏风</a>】，
  【<a href=':qunxian3__baishoukaiduo_paoleibagua'>咆雷八卦</a>】，【<a href=':qunxian3__baishoukaiduo_jiangsanshiyinnailuo'>降三世引奈落</a>】，
  【<a href=':qunxian3__baishoukaiduo_juntulilongshengjun'>军荼利龙盛军</a>】。]],
  ["$qunxian3__baishoukaiduo_zuiqiangshengwu"] = "让你看看世界第一战斗力吧",
}

local changeGeneral = function(player, new, old)
  local room = player.room
  if player.deputyGeneral == old or player.general == old then
    if player.deputyGeneral == old then
      player.deputyGeneral = new
      room:broadcastProperty(player, "deputyGeneral")
    elseif player.general == old then
      player.general = new
      room:broadcastProperty(player, "general")
    end
  else
    player.general = new
    room:broadcastProperty(player, "general")
  end
end

qunxian3__baishoukaiduo_zuiqiangshengwu:addEffect(fk.EnterDying, {
  anim_type = "big",
  can_trigger = function(self, event, target, player, data)
    return target == player and player:hasSkill("qunxian3__baishoukaiduo_zuiqiangshengwu")
        and (player.general == "qunxian3__baishoukaiduo" or player.deputyGeneral == "qunxian3__baishoukaiduo"
      or player.general == "qunxian3__baishoukaiduo_renxing" or player.deputyGeneral == "qunxian3__baishoukaiduo_renxing")
  end,
  can_wake = function(self, event, target, player, data)
    return player:usedSkillTimes("qunxian3__baishoukaiduo_zuiqiangshengwu", Player.HistoryGame) <= 1
  end,
  on_use = function(self, event, target, player, data)
    local room = player.room
    local loseskills = {}
    if player:getMark("@qunxian3__baishoukaiduo-xingtai") == "龙型" then
      for index, skillName in ipairs(player:getSkillNameList()) do
        if table.contains({ "qunxian3__baishoukaiduo_longjuan", "qunxian3__baishoukaiduo_huaifeng",
              "qunxian3__baishoukaiduo_rexi", "qunxian3__baishoukaiduo_yanyun" }, skillName) then
          table.insertIfNeed(loseskills, skillName)
        end
      end
      room:setPlayerMark(player, "@qunxian3__baishoukaiduo-xingtai", "人型")
      changeGeneral(player, "qunxian3__baishoukaiduo_renxing", "qunxian3__baishoukaiduo")
      room:handleAddLoseSkills(player, "-" .. table.concat(loseskills, "|-"))
      room:handleAddLoseSkills(player, { "qunxian3__baishoukaiduo_leimingbagua", "qunxian3__baishoukaiduo_yinnailuo",
        "qunxian3__baishoukaiduo_longshengjun", "qunxian3__baishoukaiduo_daweide" })
    elseif player:getMark("@qunxian3__baishoukaiduo-xingtai") == "人型" then
      for index, skillName in ipairs(player:getSkillNameList()) do
        if table.contains({ "qunxian3__baishoukaiduo_leimingbagua", "qunxian3__baishoukaiduo_yinnailuo",
              "qunxian3__baishoukaiduo_longshengjun", "qunxian3__baishoukaiduo_daweide" }, skillName) then
          table.insertIfNeed(loseskills, skillName)
        end
      end
      room:setPlayerMark(player, "@qunxian3__baishoukaiduo-xingtai", "酒龙型")
      changeGeneral(player, "qunxian3__baishoukaiduo_jiulongxing", "qunxian3__baishoukaiduo_renxing")
      room:handleAddLoseSkills(player, "-" .. table.concat(loseskills, "|-"))
      room:handleAddLoseSkills(player,
        { "qunxian3__baishoukaiduo_jiulongrexi", "qunxian3__baishoukaiduo_longjuanhuaifeng",
          "qunxian3__baishoukaiduo_paoleibagua", "qunxian3__baishoukaiduo_jiangsanshiyinnailuo",
          "qunxian3__baishoukaiduo_juntulilongshengjun" })
    end
    room:changeHp(player, 5 - player.hp)
    player:gainAnExtraTurn(false, "qunxian3__baishoukaiduo_zuiqiangshengwu")
  end
})





return qunxian3__baishoukaiduo_zuiqiangshengwu
